import Vue from 'vue';
import VueRouter, {RouteConfig} from 'vue-router';
import Home from '../components/tabbars/Home.vue';
import Number from '@/components/tabbars/Number.vue';
import Shopping from '@/components/tabbars/Shopping.vue';
import Search from '@/components/tabbars/Search.vue';
import NewsList from '@/components/news/NewsList.vue';
import NewInfo from '@/components/news/NewsInfo.vue';
import PhotoList from '@/components/photos/PhotoList.vue';

Vue.use(VueRouter);

const routes: RouteConfig[] = [
  {path: '/', redirect: '/home'},
  {path: '/home', name: 'Home', component: Home},
  {path: '/number', name: 'Number', component: Number},
  {path: '/shopping', name: 'Shopping', component: Shopping},
  {path: '/Search', name: 'Search', component: Search},
  {path: '/home/newslist', name: 'NewsList', component: NewsList},
  {path: '/home/newinfo/:id', name: 'NewInfo', component: NewInfo, props: true},
  {path: '/home/photolist', name: 'PhotoList', component: PhotoList},
]
;

const router = new VueRouter({
  routes,
  linkActiveClass: 'mui-active',
});

export default router;
